/**
 * 屏幕模型
 */
const { Sequelize, sequelize } = require('../dao/db');

const Screen = sequelize.define('Screen', {
    id: {
        type: Sequelize.BIGINT(11),
        autoIncrement: true,
        primaryKey: true,
        unique: true,
        comment: '主键'
    },
    userId: {
        type: Sequelize.BIGINT(11),
        field: 'user_id',
        comment: '用户id'
    },
    screenId: {        
        type: Sequelize.STRING,
        unique: true, //表示唯一的
    },
    screenName: {
        type: Sequelize.STRING,
    },
    screenDesc: {
        type: Sequelize.STRING,
    },
    screenWidth: {
        type: Sequelize.STRING,
    },
    screenHeight: {
        type: Sequelize.STRING,
    },
    defaultPage: {
        type: Sequelize.STRING,
    },
    currentPage: {
        type: Sequelize.STRING,
    }
},{
    tableName: 'screen',
})
// User.sync({ force: true })
Screen.sync().then(() => {
    console.log('Screen表模型已经同步 ');
});
module.exports = Screen